kern/file: Ensure file->data is set
authorB Horn <b@horn.uk>
Sun, 12 May 2024 02:01:40 +0000 (03:01 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commit23b6cf3cb17a9401c9397258738869e46b158371
tree699d17505d1f6d820cf110aedc2beb42cd93c8d3
parent4f44f9a948c59ebb470de5a5c3f164c7831d4a90
kern/file: Ensure file->data is set

This is to avoid a generic issue were some filesystems would not set
data and also not set a grub_errno. This meant it was possible for many
filesystems to grub_dl_unref() themselves multiple times resulting in
it being possible to unload the filesystems while there were still
references to them, e.g., via a loopback.

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name kern-file-Ensure-file-data-is-set.patch
grub-core/kern/file.c